package com.example.demo.repo

import com.example.demo.entity.Artwork
import com.example.demo.entity.ArtworkCelebrityTitle
import org.springframework.data.jpa.repository.JpaRepository

interface ArtworkCelebrityTitleRepo : JpaRepository<ArtworkCelebrityTitle, Long> {
    fun findByCidNameContainsAndTidName(cidName: String, tidName: String): List<ArtworkCelebrityTitle>
    fun findByCidCidAndTidTid(cid_cid: Long, tid_tid: Long): List<ArtworkCelebrityTitle>
    fun findByAidAid(aid_aid: Long): List<ArtworkCelebrityTitle>
    fun findByAid(aid: Artwork): List<ArtworkCelebrityTitle>

    fun deleteByAidAid(aid_aid: Long)

    fun findByAidNameContainsOrCidNameContains(aid_name: String, cid_name: String): List<ArtworkCelebrityTitle>
    fun findByCidNameContains(cid_name: String): List<ArtworkCelebrityTitle>
}